#pragma once
#include "Exception.h"
#define THROW_COMMUNICATION_EXP(ip, port, error)  throw CommunicationException(__FILE__, __LINE__, "Fail to connect to " + (ip) + ":" + (port) + ", error: " + (error))
namespace apollo
{
	namespace core
	{
		class CommunicationException :
			public apollo::core::Exception
		{
		public:
			CommunicationException( const char* file, const int lineNumber, 
				const QString &message,
				const QString &messageKey = QString(), const QStringList& parameters = QStringList(),  ErrorLevel errorLevel = ERROR,
				const std::exception* cause = NULL) throw();

			virtual ~CommunicationException(void){}
		};
	}
}
